﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="StoreManager.aspx.cs" Inherits="StoreManager" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<%@ Import Namespace="WX.WMS.BLL" %>
<%@ Import Namespace="WX.WMS.Common" %>
<%@ Import Namespace="WX.WMS.DataModel" %>

<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>库存信息</title>
    
<link href="../css/base.css" rel="stylesheet" type="text/css" />

<script type="text/javascript">


</script>
    <style type="text/css">
        .style1
        {
            FONT-WEIGHT: bolder;
            FONT-SIZE: 18pt;
            COLOR: black;
            LINE-HEIGHT: 150%;
            FONT-FAMILY: 楷体_GB2312;
            TEXT-DECORATION: underline;
            height: 50px;
        }

    </style>
</head>
<body>
    <form id="form1" runat="server">
    <div  style=" margin:0 auto; text-align:center;">
        <br />
      <table width="100%" border="0">
          <tr>
              <td class="style1" align="center" colspan="9">
                  库存信息</td>
          </tr>
          <tr>
              <td  Width="10%">
                    客户名称 
              </td>
              <td  Width="10%">
                    <asp:TextBox ID="ClientName" runat="server" Width="95%"  ></asp:TextBox>
              </td>
              <td Width="10%">
                    库位:
              </td>
              <td Width="10%">
                    <asp:DropDownList ID="ddlStock" runat="server" Width="100%" AppendDataBoundItems="true" 
                        DataTextField="STOCK_NAME" DataValueField="STOCK_ID" AutoPostBack="True" 
                        onselectedindexchanged="ddlStock_SelectedIndexChanged">
                    </asp:DropDownList>
              </td>
              <td Width="10%">
                    区位:
              </td>
              <td Width="10%">
                    <asp:DropDownList ID="ddlArea" runat="server" Width="100%" AppendDataBoundItems="true"  
                        DataTextField="AREA_NAME" DataValueField="AREA_ID" AutoPostBack="True" 
                        onselectedindexchanged="ddlArea_SelectedIndexChanged">
                    </asp:DropDownList>
              </td>
              <td Width="10%">
                    层:
              </td>
              <td Width="10%">
                    <asp:DropDownList ID="ddlFloor" runat="server" Width="100%" AppendDataBoundItems="true" 
                        DataTextField="FloorName" DataValueField="FloorID">
                    </asp:DropDownList>
              </td>
              <td>
                    <asp:ImageButton ID="searchButton" runat="server" ImageUrl="~/images/sub_search.gif" OnClick="searchButton_Click" />
                    </td>
          </tr>
          <tr>
              <td>
                    商品名称 
              </td>
              <td>
                    <asp:TextBox ID="ProductName" runat="server"  Width="95%" ></asp:TextBox>
              </td>
              <td>
                    商品编码
              </td>
              <td>
                    <asp:TextBox ID="ProductCode" runat="server"  Width="100%" ></asp:TextBox>
                    </td>
              <td>
                    条形码
                    </td>
              <td>
                    <asp:TextBox ID="BarCode" runat="server"  Width="100%" ></asp:TextBox>
                    </td>
              <td>
                    库存类型 
                    </td>
              <td>
                    <asp:DropDownList ID="ddlStockType" runat="server" Width="100%"></asp:DropDownList>
                    </td>
                    <td>
                    <asp:Label ID="Label1" runat="server" Text="没有您要的信息" Visible="False" ForeColor="Red"></asp:Label>
                    </td>
          </tr>
          <tr>
            <td colspan="9">
            <asp:GridView ID="gvInStockList" runat="server" AutoGenerateColumns="False" 
                    BackColor="White" AllowPaging="true"  PageSize="10"
                    BorderColor="#3366CC" BorderStyle="None" BorderWidth="1px" CellPadding="4" 
                    Width="100%" 
                    onpageindexchanging="gvInStockList_PageIndexChanging" 
                    onsorting="gvInStockList_Sorting" AllowSorting="True"     >
                    <FooterStyle BackColor="#99CCCC" ForeColor="#003399" />
                    <Columns>
                        <asp:TemplateField HeaderText="客户名称" SortExpression="ClientName" >
                             <ItemTemplate>
                               <%# ((Store_View)Container.DataItem).ClientName%>
                             </ItemTemplate>                 
                         </asp:TemplateField>
                                                
                        <asp:TemplateField HeaderText="条形码" SortExpression="BAR_CODE">
                             <ItemTemplate>
                             <%# ((Store_View)Container.DataItem).BAR_CODE%>
                             </ItemTemplate>                 
                        </asp:TemplateField> 
                        <asp:TemplateField HeaderText="商品编码" SortExpression="CODE">
                             <ItemTemplate>
                               <%# ((Store_View)Container.DataItem).CODE%>
                             </ItemTemplate>                 
                         </asp:TemplateField> 
                         <asp:TemplateField HeaderText="商品名称" SortExpression="ProduceNAME">
                             <ItemTemplate>
                               <%# ((Store_View)Container.DataItem).ProduceNAME%>
                             </ItemTemplate>                 
                         </asp:TemplateField>   
                         <asp:TemplateField HeaderText="货物大类" SortExpression="BigClass">
                             <ItemTemplate>
                             <%# ((Store_View)Container.DataItem).BigClass%>
                             </ItemTemplate>                 
                        </asp:TemplateField>           
                        <asp:TemplateField HeaderText="关键规格" SortExpression="KeyStandard" >
                             <ItemTemplate>
                             <%# ((Store_View)Container.DataItem).KeyStandard%>
                             </ItemTemplate>                 
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="供应商批次号" SortExpression="SupplyLotNumber">
                             <ItemTemplate>
                             <%# ((Store_View)Container.DataItem).SupplyLotNumber%>
                             </ItemTemplate>                 
                        </asp:TemplateField>                       
                        <asp:TemplateField HeaderText="型号" SortExpression="MODEL" >
                             <ItemTemplate>
                             <%# ((Store_View)Container.DataItem).MODEL %>
                             </ItemTemplate>                 
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="规格" SortExpression="STANDARD">
                             <ItemTemplate>
                            <%# ((Store_View)Container.DataItem).STANDARD %>
                             </ItemTemplate>                 
                         </asp:TemplateField>
                        <asp:TemplateField HeaderText="尺寸" SortExpression="SIZE" >
                             <ItemTemplate>
                               <%# ((Store_View)Container.DataItem).SIZE %>
                             </ItemTemplate>                 
                         </asp:TemplateField>     
                        <asp:TemplateField HeaderText="产地" SortExpression="ORIGIN">
                             <ItemTemplate>
                               <%# ((Store_View)Container.DataItem).ORIGIN %>
                             </ItemTemplate>                 
                         </asp:TemplateField>   
                        <asp:TemplateField HeaderText="牌子" SortExpression="BRAND">
                             <ItemTemplate>
                               <%# ((Store_View)Container.DataItem).BRAND %>
                             </ItemTemplate>                 
                         </asp:TemplateField>   
                        <asp:TemplateField HeaderText="主批号" SortExpression="LOT_NUMBER">
                             <ItemTemplate>
                               <%# ((Store_View)Container.DataItem).LOT_NUMBER%>
                             </ItemTemplate>                 
                         </asp:TemplateField>   
                        <asp:TemplateField HeaderText="次批号" SortExpression="SUB_LOT_NUMBER">
                             <ItemTemplate>
                               <%# ((Store_View)Container.DataItem).SUB_LOT_NUMBER %>
                             </ItemTemplate>                 
                         </asp:TemplateField>                 
                        <asp:TemplateField HeaderText="存货类型" SortExpression="STOCK_TYPE">
                             <ItemTemplate>
                                  <%# Enum.GetName(typeof(Enumerations.StockType), ((Store_View)Container.DataItem).STOCK_TYPE)%>
                             </ItemTemplate>                 
                         </asp:TemplateField>  
                        <asp:TemplateField HeaderText="柜号" SortExpression="PACKET_NO">
                             <ItemTemplate>
                               <%# ((Store_View)Container.DataItem).PACKET_NO%>
                             </ItemTemplate>                 
                         </asp:TemplateField>                               
                        <asp:TemplateField HeaderText="大件数" SortExpression="PACKET_QTY">
                             <ItemTemplate>
                               <%# ((Store_View)Container.DataItem).PACKET_QTY + ((Store_View)Container.DataItem).UnitName%>
                             </ItemTemplate>                 
                         </asp:TemplateField>   
                        <asp:TemplateField HeaderText="小件数" SortExpression="PACKET_QTY2">
                             <ItemTemplate>
                               <%# ((Store_View)Container.DataItem).PACKET_QTY2 + ((Store_View)Container.DataItem).UnitName%>
                             </ItemTemplate>                 
                         </asp:TemplateField>     
                        <asp:TemplateField HeaderText="净重" SortExpression="NET_WEIGHT">
                             <ItemTemplate>
                               <%# ((Store_View)Container.DataItem).NET_WEIGHT + ((Store_View)Container.DataItem).WeightName%>
                             </ItemTemplate>                 
                         </asp:TemplateField>
                         
                        <asp:TemplateField HeaderText="毛重" SortExpression="GROSS_WEIGHT">
                             <ItemTemplate>
                               <%# ((Store_View)Container.DataItem).GROSS_WEIGHT + ((Store_View)Container.DataItem).WeightName%>
                             </ItemTemplate>                 
                         </asp:TemplateField>
                         <asp:TemplateField HeaderText="库存位置" SortExpression="STOCK_NAME">
                             <ItemTemplate>
                             <%# ((Store_View)Container.DataItem).STOCK_NAME + "->" + ((Store_View)Container.DataItem).AREA_NAME + "->" + ((Store_View)Container.DataItem).FloorName%>
                             </ItemTemplate>                 
                        </asp:TemplateField> 
                        <asp:TemplateField HeaderText="进仓时间" SortExpression="InStock_Date">
                             <ItemTemplate>
                             <%# ((Store_View)Container.DataItem).InStock_Date.Value.ToShortDateString() %>
                             </ItemTemplate>                 
                        </asp:TemplateField> 
                        <asp:TemplateField HeaderText="库存天数" SortExpression="InventoryDay">
                             <ItemTemplate>
                               <%# ((Store_View)Container.DataItem).InventoryDay%>
                             </ItemTemplate>                 
                         </asp:TemplateField>                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
                    </Columns>
                    <RowStyle BackColor="White" ForeColor="#003399" />
                    <SelectedRowStyle BackColor="#009999" Font-Bold="True" ForeColor="#CCFF99" />
                    <PagerStyle BackColor="#99CCCC" ForeColor="#003399" HorizontalAlign="Left" />
                    <HeaderStyle BackColor="#E2F3FA" Font-Bold="True" ForeColor="Black" />
                </asp:GridView>
                <div class="pageLink" id="pageLink">
                    </div>
            </td>
          </tr>
          <tr>
            <td style="height: 17px" align="center" colspan="9">
                <asp:Button ID="btnReport" runat="server" Text="导出报表" 
                      onclick="btnReport_Click"    />                    
            </td>
          </tr>
    </table>
    
    </div>
    </form>
</body>
</html>

